<template>
  <div>
    <h4>入院资料</h4>
    <el-divider></el-divider>
    <el-container>
      <el-form label-position="right" ref="form" :model="form" :rules="formRules"  label-width="100px">
        <!-- 年龄 、血型、性别-->
        <el-row>
          <el-col :span="5">
            <el-form-item label="年龄">
              <el-input
                  placeholder="待显示"
                  v-model="form.age"
                  :disabled="true">
              </el-input>
          </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="性别">
              <el-radio-group v-model="form.sex">
                <el-radio v-for="sex in sexs" :label="sex" :key="sex">{{sex}}</el-radio>
            </el-radio-group>
          </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item label="血�?">
            <el-radio-group v-model="form.blood_type">
              <el-radio v-for="blood_type in blood_types" :label="blood_type" :key="blood_type">{{blood_type}}</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 生命体征 -->
        <el-row>
          <el-form-item label="生命体征">
            <!-- <el-radio-group v-model="form.vital_sign">
                <el-radio v-for="vital_sign in vital_signs" :label="vital_sign" :key="vital_sign">{{vital_sign}}</el-radio>
            </el-radio-group> -->
            <el-row>
              <el-col :span="4">
                <el-form-item label="体温">
                  <el-input placeholder="36.7" v-model="form.registNum"><i slot="suffix">°C</i></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-form-item label="脉率">
                  <el-input placeholder="待显�?" v-model="form.registNum"><i slot="suffix">（次/分）</i></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="4">
                  <el-form-item  label="心率">
                    <el-input placeholder="36.7" v-model="form.registNum"><i slot="suffix">（次/分）</i></el-input> 
                  </el-form-item>
              </el-col>
             <el-col :span="4">
                <el-form-item label="呼吸">
                  <el-input placeholder="36.7" v-model="form.registNum"><i slot="suffix">（次/分）</i></el-input> 
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-form-item label="收缩�?">
                  <el-input placeholder="待显�?" v-model="form.registNum"><i slot="suffix">（mmHg�?</i></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="4">
                  <el-form-item  label="舒张�?">
                    <el-input placeholder="36.7" v-model="form.registNum"><i slot="suffix">（mmHg�?</i></el-input> 
                  </el-form-item>
              </el-col>

              <el-col :span="4">
                  <el-form-item  label="平均动脉�?">
                    <el-input placeholder="36.7" v-model="form.registNum"><i slot="suffix">（mmHg�?</i></el-input> 
                  </el-form-item>
              </el-col>

              <el-col :span="4">
                  <el-form-item  label="疼痛指数">
                    <el-input placeholder="36.7" v-model="form.registNum"><i slot="suffix">�?0-10分）</i></el-input> 
                  </el-form-item>
              </el-col>
            </el-row>
          </el-form-item>
        </el-row>
        <!-- 资料来源 -->
        <el-row>
          <el-form-item label="资料来源">
            <el-radio-group v-model="form.info_source">
                <el-radio v-for="info_source in info_sources" :label="info_source" :key="info_source">
                  {{info_source}}
                  <el-input v-if="info_source== '其他'" placeholder="其他" v-model="form.info_source" clearable></el-input>
                </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 入院来源 -->
        <el-row>
          <el-form-item label="入院来源">
            <el-radio-group v-model="form.admission_from">
                <el-radio v-for="admission_from in admission_froms" :label="admission_from" :key="admission_from">{{admission_from}}
                  <el-input v-if="admission_from == '其他'" placeholder="其他" v-model="form.admission_from" clearable></el-input>
                </el-radio>
                
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 入院方式 -->
        <el-row>
          <el-form-item label="入院方式">
            <el-radio-group v-model="form.admission_way">
                <el-radio v-for="admission_way in admission_ways" :label="admission_way" :key="admission_way">
                  {{admission_way}}
                  <el-input v-if="admission_way== '其他'" placeholder="其他" v-model="form.admission_way" clearable></el-input>
                </el-radio>
                
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 职业 -->
        <el-row>
          <el-form-item label="职业">
            <el-radio-group v-model="form.job">
                <el-radio v-for="job in jobs" :label="job" :key="job">
                  {{job}}
                  <el-input v-if="job== '其他'" placeholder="其他" v-model="form.job" clearable></el-input>
                </el-radio>
                
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 宗教 -->
        <el-row>
           <el-form-item label="宗教">
            <el-radio-group v-model="form.religion">
                <el-radio v-for="religion in religions" :label="religion" :key="religion">
                  {{religion}}
                  <el-input v-if="religion== '其他'" placeholder="其他" v-model="form.religion" clearable></el-input>
                </el-radio>
                
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 教育程度 -->
        <el-row>
           <el-form-item label="教育程度">
            <el-radio-group v-model="form.education_degree">
                <el-radio v-for="education_degree in education_degrees" :label="education_degree" :key="education_degree">{{education_degree}}</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 语言 -->
         <el-row>
           <el-form-item label="语言">
            <el-radio-group v-model="form.language">
                <el-radio v-for="language in languages" :label="language" :key="language">
                  {{language}}
                  <el-input v-if="language== '其他'" placeholder="其他" v-model="form.language" clearable></el-input>
                </el-radio>
               
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 婚姻状况 -->
        <el-row>
           <el-form-item label="婚姻状况">
            <el-radio-group v-model="form.marriage">
              <el-radio v-for="marriage in marriages" :label="marriage" :key="marriage">
                {{marriage}}
                <el-input v-if="marriage== '其他'" placeholder="其他" v-model="form.marriage" clearable></el-input>
              </el-radio>
               
            </el-radio-group>
          </el-form-item>
        </el-row>
         <!-- 主要照顾�? -->
        <el-row>
           <el-form-item label="主要照顾�?">
            <el-radio-group v-model="form.other_watcher">
                <el-radio v-for="other_watcher in other_watchers" :label="other_watcher" :key="other_watcher">
                  {{other_watcher}}
                  <el-input v-if="other_watcher== '其他'" placeholder="其他" v-model="form.other_watcher" clearable></el-input>
                </el-radio>
                
            </el-radio-group>
          </el-form-item>
        </el-row>
         <!-- 就诊内容 -->
        <el-row>
           <el-form-item label="就诊内容">
            <el-radio-group v-model="form.doctor_content">
                <el-radio v-for="doctor_content in doctor_contents" :label="doctor_content" :key="doctor_content">
                  {{doctor_content}}
                   <el-input v-if="doctor_content== '其他'" placeholder="其他" v-model="form.doctor_content" clearable></el-input>
                </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-row>
        <!-- 提交按钮 -->
        <el-row :gutter="10">
          <el-col :span="7">
            <div style="color: #ffffff;">-</div>
          </el-col>
          <el-col :span="3">
            <el-form-item size="large">
              <el-button type="primary" @click.native.prevent="onSubmit">提交</el-button>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item size="large">
              <el-button  type="danger" v-on:click="clearmsg">清空</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>  
    </el-container>
  </div>
</template>

<script>
export default {
  name: "informationPage",
  components:{
  },
  data(){
    return{
      // 血�?
      blood_types:['A','B','O','AB'],
      // 性别
      sexs:['�?','�?'],
      // 生命体征
      vital_signs:['体温','脉率','心率','呼吸','收缩�?','舒张�?','平均动脉�?','疼痛指数'],
      // 资料来源
      info_sources:['自述','急诊','友人代述','他人代述','其他'],
      // 入院来源
      admission_froms:['门诊','急诊','外院转入','其他'],
      // 入院方式
      admission_ways:['步行','轮椅','平车','抱入','其他'],
      // 职业
      jobs:['�?','�?','公务�?','学生','教师','军人','自由职业','个体�?','离退','无业','其他'],
      // 宗教
      religions:['�?','佛教','道教','伊斯兰教','基督教','天主教','其他'],
      // 教育程度
      education_degrees:['文盲','学龄�?','小学','中学','中专','高中','大专','大学','研究生以�?'],
      // 语言
      languages:['普通话','地方方言','外语','无法语言','其他'],
      // 婚姻状况
      marriages:['未婚','已婚','离婚','再婚','分居','同居','丧偶','不适用','其他'],
      // 主要照顾�?
      other_watchers:['父母','子女','兄弟姐妹','�?/祖父�?','孙子/外孙','亲戚','朋友','月嫂','护工','�?','其他'],
      // 就诊内容
      doctor_contents:['观察','诊治','检�?','手术','其他'],


      form:{
        age:'18',
        blood_type:'A',
        sex:'�?',
        vital_sign:'',
        info_source: '',
        admission_from: '',
        admission_way: '',
        job: '',
        religion: '',
        education_degree: '',
        language: '',
        marriage:'',
        other_watcher:'',
        doctor_content: '',
      },
      formRules:{
        age:[{required:true,trigger:'blur'}],
        blood_type:[{required:true,trigger:'blur'}],
        sex:[{required:true,trigger:'blur'}],
        vital_sign:[{required:true,trigger:'blur'}],
        info_source:[{required:true,trigger:'blur'}],
        admission_from:[{required:true,trigger:'blur'}],
        admission_way:[{required:true,trigger:'blur'}],
        job:[{required:true,trigger:'blur'}],
        religion:[{required:true,trigger:'blur'}],
        education_degree:[{required:true,trigger:'blur'}],
        language:[{required:true,trigger:'blur'}],
        marriage:[{required:true,trigger:'blur'}],
        other_watcher:[{required:true,trigger:'blur'}],
        doctor_content:[{required:true,trigger:'blur'}],
      }
      
    }
  },
  computed:{
  },
  props:{
      
  },
  methods:{
    
  }
}
</script>


<style scoped>
  .bg-purple {
    background: #b8e6ce;
  }
  .msg{
    min-height: 50px;
    margin-top: 8px;
  }
  .grid-content {
    border-radius: 4px;
    padding-top: 2%;
  }
</style>
